bitkeeper revision 1.133 (3e73449239zR-zlZEisfftdXqgQSSw)
authorkaf24@scramble.cl.cam.ac.uk <kaf24@scramble.cl.cam.ac.uk>
Sat, 15 Mar 2003 15:19:46 +0000 (15:19 +0000)
committerkaf24@scramble.cl.cam.ac.uk <kaf24@scramble.cl.cam.ac.uk>
Sat, 15 Mar 2003 15:19:46 +0000 (15:19 +0000)
Many files:
  Fixes to allow compile-time SMP disable (by removing CONFIG_SMP from config.h).

18 files changed:
xen/arch/i386/acpitable.c
xen/arch/i386/apic.c
xen/arch/i386/boot/boot.S
xen/arch/i386/io_apic.c
xen/arch/i386/mpparse.c
xen/arch/i386/pci-i386.c
xen/arch/i386/setup.c
xen/arch/i386/smp.c
xen/arch/i386/smpboot.c
xen/arch/i386/trampoline.S
xen/drivers/block/xen_block.c
xen/drivers/pci/quirks.c
xen/drivers/pci/setup-res.c
xen/include/asm-i386/apic.h
xen/include/asm-i386/mpspec.h
xen/include/asm-i386/time.h
xen/include/xeno/time.h
xen/net/dev.c

index 1078db3eee3aa2d6b2f38311840cb132cddade36..a24050bb8b4f3890bb32ecb5a5a4e4d16317a646 100644 (file)
@@ -41,6 +41,8 @@
 #include <asm/page.h>
 /*#include <asm/pgtable.h>*/
 
+#ifdef CONFIG_X86_IO_APIC
+
 #include "acpitable.h"
 
 static acpi_table_handler acpi_boot_ops[ACPI_TABLE_COUNT];
@@ -547,3 +549,5 @@ config_acpi_tables(void)
                printk("Enabling the CPU's according to the ACPI table\n");
        }
 }
+
+#endif /* CONFIG_X86_IO_APIC */
index 35adba4ae118b47c159f7a5194624c20d6d43b32..2621bd11093c3cf802f41370fe569264618ac6a9 100644 (file)
@@ -45,9 +45,8 @@
 #include <asm/mpspec.h>
 #include <asm/pgalloc.h>
 #include <asm/hardirq.h>
-
+#include <asm/apic.h>
 #include <xeno/ac_timer.h>
-
 #include <xeno/perfc.h>
 
 #undef APIC_TIME_TRACE
@@ -839,7 +838,10 @@ int __init APIC_init_uniprocessor (void)
 
     connect_bsp_APIC();
 
-    cpu_online_map = phys_cpu_present_map = 1;
+#ifdef CONFIG_SMP
+    cpu_online_map = 1;
+#endif
+    phys_cpu_present_map = 1;
     apic_write_around(APIC_ID, boot_cpu_physical_apicid);
 
     apic_pm_init2();
index 47bdb27519fc3554c84d5b7054428221500b3111..1ef335d0306e47701100a25e41bf8b16fc640168 100644 (file)
@@ -65,6 +65,7 @@ hal_entry:
         and     $0x7f,%ecx /* disable GLOBAL bit */
         mov     %ecx,%cr4
                 
+#ifdef CONFIG_SMP
         /* Is this a non-boot processor? */
         cmp     $(SECONDARY_CPU_FLAG),%ebx
         jne     continue_boot_cpu
@@ -72,6 +73,7 @@ hal_entry:
         call    start_paging
         lidt    idt_descr                        
         jmp     initialize_secondary
+#endif
         
 continue_boot_cpu:
         add     $__PAGE_OFFSET,%ebx
index fbea77e6467ca982c1b50972f026b0c4b3291311..5935864c71e40392bae1a870c62dea8edfe46fe2 100644 (file)
@@ -32,6 +32,7 @@
 #include <asm/desc.h>
 #include <asm/smpboot.h>
 
+#ifdef CONFIG_X86_IO_APIC
 
 static unsigned int nmi_watchdog;  /* XXXX XEN */
 
@@ -1749,3 +1750,5 @@ void __init setup_IO_APIC(void)
        check_timer();
        print_IO_APIC();
 }
+
+#endif /* CONFIG_X86_IO_APIC */
index 0e2ca870a9b0a8b5dcb7f27fb8732a1cef3189f9..c0776a7387d358d79ffb5280a034a1b1185c44c2 100644 (file)
@@ -18,6 +18,7 @@
 #include <asm/io.h>
 #include <xeno/irq.h>
 #include <xeno/smp.h>
+#include <asm/apic.h>
 #include <asm/mpspec.h>
 #include <asm/pgalloc.h>
 #include <asm/smpboot.h>
index 7a213d824cea79bff2f16f8ae68f3eec2b8ee888..7eca534aecc5042a0d94d6013eca9a9d9a24406d 100644 (file)
@@ -86,7 +86,7 @@
  */
 
 #include <linux/types.h>
-/*#include <linux/kernel.h>*/
+#include <linux/lib.h>
 #include <linux/pci.h>
 #include <linux/init.h>
 #include <linux/ioport.h>
index 6b2c380adcc7b7ae46393ea6a15a0522657a9dff..bbd2d65603826cfed2f3a8bb92d14a3fb7a6a780 100644 (file)
@@ -309,12 +309,16 @@ void __init start_of_day(void)
     identify_cpu(&boot_cpu_data); /* get CPU type info */
     if ( cpu_has_fxsr ) set_in_cr4(X86_CR4_OSFXSR);
     if ( cpu_has_xmm )  set_in_cr4(X86_CR4_OSXMMEXCPT);
+#ifdef CONFIG_SMP
     find_smp_config();            /* find ACPI tables */
     smp_alloc_memory();           /* trampoline which other CPUs jump at */
+#endif
     paging_init();                /* not much here now, but sets up fixmap */
+#ifdef CONFIG_SMP
     if ( smp_found_config ) get_smp_config();
+#endif
     domain_init();
-       scheduler_init();       
+    scheduler_init();  
     trap_init();
     init_IRQ();  /* installs simple interrupt wrappers. Starts HZ clock. */
     time_init(); /* installs software handler for HZ clock. */
index 008d1aa83abc8f48b7b5053af7b6bf7b7085a4b1..bc0952fc31c339935a3cef596cf839904f392490 100644 (file)
@@ -17,6 +17,8 @@
 #include <asm/pgalloc.h>
 #include <asm/smpboot.h>
 
+#ifdef CONFIG_SMP
+
 /*
  *     Some notes on x86 processor bugs affecting SMP operation:
  *
@@ -576,3 +578,4 @@ asmlinkage void smp_call_function_interrupt(void)
     }
 }
 
+#endif /* CONFIG_SMP */
index 401b8f80206e305586591273ddff697a42aa35ff..4f198941f5912c2074945a68bfe3719af8901f02 100644 (file)
@@ -46,6 +46,8 @@
 #include <xeno/delay.h>
 #include <xeno/lib.h>
 
+#ifdef CONFIG_SMP
+
 /* Set if we find a B stepping CPU                     */
 static int smp_b_stepping;
 
@@ -960,3 +962,5 @@ void __init smp_boot_cpus(void)
  smp_done:
     ;
 }
+
+#endif /* CONFIG_SMP */
index f0beef725a8a251d3c9e696efc227db0ab24fc3d..79f58d746c83fea873826ab219718b32f8642f74 100644 (file)
@@ -18,6 +18,8 @@
 #include <xeno/config.h>
 #include <asm/page.h>
 
+#ifdef CONFIG_SMP
+        
 .data
 
 .code16
@@ -52,3 +54,5 @@ gdt_48:
 
 .globl SYMBOL_NAME(trampoline_end)
 SYMBOL_NAME_LABEL(trampoline_end)
+
+#endif /* CONFIG_SMP */
index a49817d46f7225b6cf29722368a99a10c477ea5d..156dcbb94c0bc987d6668ebb93494619df648408 100644 (file)
@@ -13,7 +13,7 @@
 #include <hypervisor-ifs/block.h>
 #include <hypervisor-ifs/hypervisor-if.h>
 #include <asm-i386/io.h>
-#include <asm/spinlock.h>
+#include <xeno/spinlock.h>
 #include <xeno/keyhandler.h>
 #include <xeno/interrupt.h>
 #include <xeno/segment.h>
index 54e3e974d3af45be5355983b6f9369a0fbef7d34..af7b7999c07b41c9fd45182a58af817cdc21ee7f 100644 (file)
@@ -14,7 +14,7 @@
 
 #include <linux/config.h>
 #include <linux/types.h>
-/*#include <linux/kernel.h>*/
+#include <linux/lib.h>
 #include <linux/pci.h>
 #include <linux/init.h>
 #include <linux/delay.h>
index 1053ad5489c7c867699451be547587f22d18e745..bc27b906b4a2b03d453ca9535fe43e945f056549 100644 (file)
@@ -17,7 +17,7 @@
  */
 
 #include <linux/init.h>
-/*#include <linux/kernel.h>*/
+#include <linux/lib.h>
 #include <linux/pci.h>
 #include <linux/errno.h>
 #include <linux/ioport.h>
index 574cc232034b35c6b1136543a733dc74c6d34ac7..264f6bd44b1e0830e9fa78f4e4beecf7554dd69a 100644 (file)
@@ -1,8 +1,8 @@
 #ifndef __ASM_APIC_H
 #define __ASM_APIC_H
 
-//#include <linux/config.h>
-//#include <linux/pm.h>
+#include <linux/config.h>
+#include <asm/ptrace.h>
 #include <asm/apicdef.h>
 #include <asm/system.h>
 
index 2829cb54a31eeb5a8987a9aa21f875869a691386..4a8c49976331ff0341b7d5fbf22590f3305a5184 100644 (file)
@@ -218,7 +218,6 @@ extern int mpc_default_type;
 extern int mp_current_pci_id;
 extern unsigned long mp_lapic_addr;
 extern int pic_mode;
-extern int using_apic_timer;
 
 #endif
 
index 2f834908a73d6431923a5d44a04cbd857841dc10..9c9ae871824e765005362e71cb7c684be25c5368 100644 (file)
@@ -46,4 +46,6 @@ extern  s_time_t stime_now;      /* time in ns at last timer IRQ */
  */
 typedef u64 dv_time_t;
 
+extern int using_apic_timer;
+
 #endif /* _ASM_TIME_H_ */
index a017b0d2b0f7171df91cb928c6da78896abc666d..51b8a3eceef5ab091d08dd1122339b1568395d49 100644 (file)
@@ -30,6 +30,7 @@
 #include <asm/ptrace.h>  /* XXX Only used for do_timer which should be moved */
 #include <asm/time.h>    /* pull in architecture specific time definition */
 #include <xeno/types.h>
+#include <hypervisor-ifs/hypervisor-if.h>
 
 /*
  * Init time
index 352a3b1a565ef5213e12cfdd38c5a5a4598409d6..51d9ef66e00b3bfe4986bfef21b314499609bf43 100644 (file)
@@ -558,9 +558,7 @@ void deliver_packet(struct sk_buff *skb, net_vif_t *vif)
 
 int netif_rx(struct sk_buff *skb)
 {
-#ifdef CONFIG_SMP
     unsigned long cpu_mask;
-#endif
     int this_cpu = smp_processor_id();
     unsigned long flags;
     net_vif_t *vif;